package comparator;

import student.Student;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025/5/11
 * Time: 01:14
 */

public class demo {
    //比较器
    public static void main(String[] args) {
        Student student1 = new Student("张三",10);
        Student student2 = new Student("李四",4);

        System.out.println(new AgeComparator().compare(student1, student2));

        System.out.println(new NameComparator().compare(student1, student2));
    }
}
